import request from '@/utils/request';
import { getCurrentInstance } from 'vue';
const errortips =
  getCurrentInstance()?.appContext.config.globalProperties.$errortips;

//挂单列表
export async function get_maker_list(params) {
  const res = await request.post('/order/maker/get_list', {
    ...params
  });
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}

//挂单详情
export async function detail(params) {
  const res = await request.post('/order/maker/detail', {
    ...params
  });
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
//挂单删除
export async function del_maker(params) {
  const res = await request.post('/order/maker/del_maker', {
    ...params
  });
  if (res.data.code === 1) {
    return res.data;
  }
  return Promise.reject(res.data.msg);
}
